package edu.gatech.cs4220;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;

//XXX refactor to use LocationManager#addProximityAlert()
public class ProfileListenerEngine implements LocationListener
{
	LocationProfileSet profiles;
	
	public ProfileListenerEngine(LocationProfileSet profiles)
	{
		this.profiles = profiles;
	}

	@Override
	public void onLocationChanged(Location location)
	{
		profiles.applyProfile(profiles.getClosestElegibleProfile(location));
	}

	@Override
	public void onProviderDisabled(String provider)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void onProviderEnabled(String provider)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void onStatusChanged(String provider, int status, Bundle extras)
	{
		// TODO Auto-generated method stub

	}

}
